/**
 * enter a character:a
 * a
 * 
 * ch1 = 10
 * enter a character:
 * ch2 = -1
 * 1. 当输入多个字符时，此时也只会读取一个。
 * 2. 回车键也会被当作一个字符被读取。
 * 3. 键盘按下ctrl+d ,getchar会读取到-1.
 *
 */
#include<stdio.h>
int main(){
	int ch;
	int ch1;
	int ch2;
	printf("enter a character:");
	ch = getchar();
	ch1 = getchar();
	putchar(ch);
	putchar(ch1);
	putchar('\n');
	printf("ch1 = %d",ch1);
	putchar('\n');
	printf("enter a character:");
	ch2 = getchar();
	printf("\nch2 = %d",ch2);
	putchar('\n');
}

